<script>
    function modalLowker(id){
        $('#free').load("<?= base_url() ?>lowker/detail/" + id);
    }
    function editLowker(id){
        window.location = "<?= base_url() ?>lowker/edit/" + id;
    }
</script>
<div class="row">
    <div class="span12">
        <div class="row">
            <div class="span12">
                <h4>Lowongan Pekerjaan</h4><br/>
                <table class="table table-bordered table-striped responsive-utilities">
                    <thead>
                        <tr>
                            <th>Title</th>
                            <th>Kantor</th>
                            <th>Penempatan</th>
                            <th>Kualifikasi</th>
                            <th>Pendidikan</th>
                            <th>Jenis Kelamin</th>
                            <th>Umur</th>
                        </tr>
                    </thead>
                    <tbody>
                        <? if (@$dt): ?>
                            <? foreach ($dt as $k => $v) : ?>
                                <tr data-toggle="modal"  href="#free" onclick="modalLowker('<?= $v->jv_id ?>')">
                                    <td><?= $v->jv_title ?></td>
                                    <td><?= $v->company_name ?></td>
                                    <td><?= $v->jv_location ?></td>
                                    <td><?= $v->jv_qualification ?></td>
                                    <td><?= $v->jv_education ?></td>
                                    <td><?= $v->jv_gender == "L" ? "Laki-laki" : ($v->jv_gender == "P" ? "Perempuan" : "Semua")  ?></td>
                                    <td><?= $v->jv_age_min ?> - <?= $v->jv_age_max ?></td>
                                </tr>
                            <? endforeach; ?>
                            <? if ($this->pagination->create_links() <> "") : ?>
                                <tr>
                                    <th colspan="7" style="text-align: center;"><?= $this->pagination->create_links(); ?></th>
                                </tr>
                            <? endif; ?>
                        <? else: ?>
                            <tr>
                                <td colspan="7">Tidak ada data yang ditemukan</td>
                            </tr>
                        <? endif; ?>
                    </tbody>
                </table>
                <input type="button" value="Add Job Vacation" class="btn-primary" onclick="window.location = '<?= base_url() ?>lowker/add'" />
            </div>
        </div>
    </div>
</div>
<div class="modal hide fade" id="free"></div>